for the candle pattern we want to see the arrangement of similar may not be exactly on the higher toimeframe of the ea before a trade 
is triggered.
for example sell 1 the rules are:
0 → 1: All red (bearish) candles

1 → 2: All green (bullish) candles

2 → 3: All red (bearish) candles

3 → 4: All green (bullish) candles

Point 0 must be lower than point 2

note: it can be one candle that form one point to another and can be more, once another color candle show new point will start

same goes for the other pattern